package com.ruowei.security;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class UserModel extends User {

    private Long id;
    private String userName;
    private String userCode;
    private String officeCode;
    private Long officeId;

    public UserModel(String username, String password, Collection<? extends GrantedAuthority> authorities,
                     Long id, String userName, String userCode, String officeCode, Long officeId) {
        super(username, password, authorities);
        this.id = id;
        this.userName = userName;
        this.userCode = userCode;
        this.officeCode = officeCode;
        this.officeId = officeId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getOfficeCode() {
        return officeCode;
    }

    public void setOfficeCode(String officeCode) {
        this.officeCode = officeCode;
    }

    public Long getOfficeId() {
        return officeId;
    }

    public void setOfficeId(Long officeId) {
        this.officeId = officeId;
    }
}
